/*
 * CountBetweenMarkers.h
 *
 *  Created on: 25.03.2013
 *      Author: mag
 */

#ifndef BACKEND_COUNTBETWEENMARKERS_H_
#define BACKEND_COUNTBETWEENMARKERS_H_

#include "TimeTagger.h"

class CountBetweenMarkers : public _Iterator {
public:
	CountBetweenMarkers(int _counter, int _marker, int _bins);
	virtual ~CountBetweenMarkers();

	virtual const char *getClassName();
	virtual const char * getScpiCommand();
	virtual std::string getScpiParameters();

	virtual void getMeta(long long **ARGOUTVIEWM_ARRAY2, int *DIM1);

	virtual void clear();
	bool ready();
	void getData(int **ARGOUTVIEWM_ARRAY1, int *DIM1, bool blocking=0);

	virtual void next(Tag* list, int count, long long time);

private:
	int *data;

	int counter;
	int marker;
	int bins;

	int state;
};


#endif /* COUNTBETWEENMARKERS_H_ */
